<?PHP

	class tpl_globals {
		
		public static function calendar_styles(){
			return<<<EOV
<style type='text/css'>

	.not_a_day, .empty_day, .event_day {
		text-align: center;
		background: #E2E7EA;
	}

	.month_name, .day_name, .month_nav {
		text-align: center;
		background: #D3D9DE;
		font-weight: bold;
	}

	.month_nav {
		cursor: pointer;
	}

	.empty_day {
		background: #EAECF0;
	}

	.event_day {
		cursor: pointer;
		color: #B62325;
	}

	.calendar_container {
		background: white;
		border: 1px solid #909397;
	}

</style>
EOV;
		}
		
		public static function form_styles2(){		
			return<<<EOV
<style type='text/css'>

	.form_container {
		border: 1px solid #909397;
		background: white;
		padding: 1px;
		padding-bottom: 0px;
	}

	.row {
		padding: 5px;
		border-bottom: 1px solid white;
	}

	.even {
		background: #E2E7EA;
	}

	.odd {
		background: #EAECF0;
	}

	.end {
		background: #D3D9DE;
		text-align: center;
	}

	.title {
		background: url(./themes/default/images/table_header_bg.png);
		height: 20px;
		font-weight: bold;
		font-size: 14px;
	}

	.start {
		background: #D3D9DE;
		text-align: left;
		font-style: italic;
	}

	.error {
		color: #B62325;
		background: #EDE7EA;
		text-align: left;
		font-weight: bold;
	}

	.label_container {
		float: left;
		text-align: left;
		width: 50%;
	}

	.label_container .name {
		font-weight: bold;
		font-size: 12px;
	}

	.label_container .desc {
		font-size: 10px;
		font-style: italic;
	}

	.label_container .errormsg {
		color: #B62325;
		font-size: 10px;
	}

	.form_button_norm, .form_button_over {
		border: 0px;
		margin: 0px;
		padding: 0px;
		background: url(./themes/default/images/button_dark.png);
		height: 30px;
		width: 85px;
		cursor: pointer;
		color: black;
		font-weight: bold;
		font-size: 12px;
	}

	.form_button_over {
		background-position: 0px 30px;
		color: white;
	}

	.form_text_norm, .form_text_over {
		margin: 0px;
		padding: 3px;
		font-size: 12px;
		background: white;
		border: 1px solid #909397;
	}

	.form_text_over {
		background: white;
		border: 1px solid #469FFA;
	}
</style>
EOV;
		}
		
		public static function header(){
			return <<<EOF
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta name='author' content='X7 Group' />
		<meta http-equiv="content-type" value="text/html; charset=UTF-8" />
	</head>
	<body>
EOF;
		}
		
		public static function welcome_header($pageid){
			global $settings;
			
			$login_button_class = ($pageid == 'login' ? 'cssbox_nav_button_left_hover' : 'cssbox_nav_button_left_norm');
			$register_button_class = (!$settings['allow_registration'] ? 'cssbox_nav_button_inactive' : ($pageid == 'register' ? 'cssbox_nav_button_hover' : 'cssbox_nav_button_norm') );
			$calendar_button_class = ($pageid == 'calendar' ? 'cssbox_nav_button_hover' : 'cssbox_nav_button_norm');
			$reset_button_class = (!$settings['password_recovery_link'] ? 'cssbox_nav_button_inactive' : ($pageid == 'recover' ? 'cssbox_nav_button_hover' : 'cssbox_nav_button_norm') );
			$verify_button_class = (($settings['account_activation'] == 'user' && $settings['send_welcome_email']) ? ($pageid == 'verify' ? 'cssbox_nav_button_hover' : 'cssbox_nav_button_norm') : 'cssbox_nav_button_inactive' );

			return<<<EOV
<div class="cssbox" style='width: 734px !important;'>
	<div style='position: absolute; top: 6px;left: 7px;'>
		<div class='$login_button_class' onclick="document.location='./index.php'" onmouseover="this.className=this.className.replace('_norm','_hover');" onmouseout="if('{$pageid}' != 'login') this.className=this.className.replace('_hover','_norm');">{$GLOBALS['LANG']->lang_intro->login}</div>
		<div class='$register_button_class' onclick="document.location='./index.php?act=register'" onmouseover="this.className=this.className.replace('_norm','_hover');" onmouseout="if('{$pageid}' != 'register') this.className=this.className.replace('_hover','_norm');">{$GLOBALS['LANG']->lang_intro->register}</div>
		<div class='$calendar_button_class' onclick="document.location='./index.php?act=calendar'" onmouseover="this.className=this.className.replace('_norm','_hover');" onmouseout="if('{$pageid}' != 'calendar') this.className=this.className.replace('_hover','_norm');">{$GLOBALS['LANG']->lang_intro->calendar}</div>
		<div class='$reset_button_class' onclick="document.location='{$settings['password_recovery_link']}'" onmouseover="this.className=this.className.replace('_norm','_hover');" onmouseout="if('{$pageid}' != 'recover') this.className=this.className.replace('_hover','_norm');">{$GLOBALS['LANG']->lang_intro->reset_pass}</div>
		<div class='$verify_button_class' onclick="document.location='./index.php?act=verify'" onmouseover="this.className=this.className.replace('_norm','_hover');" onmouseout="if('{$pageid}' != 'verify') this.className=this.className.replace('_hover','_norm');">{$GLOBALS['LANG']->lang_intro->verify}</div>
		<div onclick="window.open('{$settings['help_url']}&skin=full');" class='cssbox_nav_button_right_norm' onmouseover="this.className=this.className.replace('_norm','_hover');" onmouseout="this.className=this.className.replace('_hover','_norm');">{$GLOBALS['LANG']->lang_intro->help}</div>
	</div>
	<div class='boxhead'><h2><div style='height: 50px;'></div></h2></div>
	<div class="boxbody" style='width: 700px;'>
		<div style='margin: 5px;'>
EOV;
		}
		
		public static function welcome_footer(){
			return <<<EOF
		</div>
	</div>
</div>	
EOF;
		}
		
		public static function inner_global_styles(){
			return <<<EOF
<style type='text/css'>
	html, body {
		background: #E3E8EF;
	}
</style>
EOF;
		}
		
		public static function outer_global_styles(){
			return <<<EOF
<style type='text/css'>
	html, body {
		background: #CCD1D7;
	}
	
	/* This box code is a slightly modified version of Ryan Thrash's (http://www.modxcms.com/ryan-thrash.html) */
	.cssbox, .cssbox .boxbody, .cssbox .boxhead, .cssbox .boxhead h2 {
		background: transparent url(./themes/default/images/box1.png) no-repeat bottom right;
	}

	.simplebox, .simplebox .boxbody, .simplebox .boxhead, .simplebox .boxhead h2 {
		background: transparent url(./themes/default/images/plain_box.png) no-repeat bottom right;
	}

	.cssbox {
		margin: auto;
		position: relative;
	}

	.cssbox .boxbody {
   		margin-top: -25px !important;			/* The nav buttons push the content box down; this pulls is back up */
		width: 50%;
	}

	.cssbox .boxhead {
		background-position: top right;
		padding-right: 50%;
	}

	.cssbox .boxhead h2 {
		background-position: top left;
		margin: 0;
		border: 0;
		padding: 4px 0px 10px 0px;	/* IE Truncates the top-right corner if top padding is < 4; I have no idea why */
		height: auto !important;
		height: 1%;                	/* IE Holly Hack */
	}

	.cssbox .boxbody {
		background-position: bottom left;
		margin-right: 10px;
		padding: 0px 5px 15px 15px;
	}
	
	.cssbox_nav_button_norm,  .cssbox_nav_button_left_norm,  .cssbox_nav_button_right_norm, .cssbox_nav_button_inactive,
	.cssbox_nav_button_hover, .cssbox_nav_button_left_hover, .cssbox_nav_button_right_hover {
		float: left;
		width: 120px;
		text-align: center;
		height: 21px;
		padding-top: 6px;
		cursor: pointer;
		font-size: 12px;
		font-weight: bold;
		color: black;
	}

	.cssbox_nav_button_inactive {
		color: #909397;
		cursor: auto;
	}

	.cssbox_nav_button_hover, .cssbox_nav_button_left_hover, .cssbox_nav_button_right_hover {
		background: url(./themes/default/images/cssbox_button.png);
		background-position: -5px 0px;
		color: white;
	}

	.cssbox_nav_button_left_hover {
		background-position: 0px 0px;
	}

	.cssbox_nav_button_right_hover {
		background-position: top right;
	}
</style>
EOF;
		}
		
		public static function form_styles(){
			return <<<EOF
<style type='text/css'>
	.instructions {
		font-size: 10px;
	}
	
	select {
		width: 150px;
		border: 1px solid #797b7f;
		padding: 2px;
	}
	
	.input_container_blur, .input_container_focus {
		height: 25px;
		width: 150px;
		background-image: url(./themes/default/images/text_input_bg.png);
		float: left;
	}

	.input_container_focus {
		background-position: 0px 25px;
	}

	.input_box {
		padding: 0px;
		border: 0px;
		margin: 5px 7px 0px 7px;
		width: 136px;
		font-size: 12px;
		background: transparent;
	}
	
	.form_button_norm, .form_button_over {
		border: 0px;
		margin: 0px;
		padding: 0px;
		background: url(./themes/default/images/button_dark.png);
		height: 30px;
		width: 85px;
		cursor: pointer;
		color: black;
		font-weight: bold;
		font-size: 12px;
	}

	.form_button_over {
		background-position: 0px 30px;
		color: white;
	}
	
	.small_error_text {
		font-size: 10px;
		color: #B62325;
	}
	
	.box_container {
		background: white;
		border: 1px solid #797b7f;
	}
	
	.errorbox_inside {
		font-size: 10px;
		color: #B62325;
		background: #EDE7EA;
		margin: 1px;
		padding: 5px;
	}
	
	.infobox_inside {
		background: #e2e7ea;
		margin: 1px;
		padding: 5px;
	}
</style>
EOF;
		}
		
		public static function global_styles_shared(){
			return <<<EOF
<style type='text/css'>
	html, body {
		font-size: 12px;
		font-family: verdana, tahoma, sans-serif;
		color: #42494f;
		margin: 0px;
		padding: 3px;
	}

	a {
		color: #24517F;
		text-decoration: none;
	}

	a:hover {
		color: #3981CB;
		text-decoration: underline;
	}
	
	.table_header {
		background: url(./themes/default/images/table_header_bg.png) #ccd1d7;
		border: 1px solid #797b7f;
		border-bottom: 0px;
		height: 23px;
		padding-top: 7px;
		font-weight: bold;
		font-size: 14px;
	}
	
	.inner_table_header {background: url(./themes/default/images/table_header_bg.png) #ccd1d7;
		border-top: 1px solid #797b7f;
		border-bottom: 1px solid #797b7f;
		height: 23px;
		padding-top: 7px;
		font-weight: bold;
		font-size: 14px;
	}
	
	table {
		border: 1px solid #797b7f;
		background: white;
	}
	
	.td1 {
		background: #EAECF0;
	}
	
	.td2 {
		background: #e2e7ea;
	}
	
	.table_header_row {
		background: #D3D9DE !important;
		font-weight: bold;
	}
</style>
EOF;
		}
		
		public static function footer($cr=true){
			
			$cr = $cr ? "<div style='margin-top: 40px;font-size: 10px;text-align: center;position: relative;z-index: 100;'>{$GLOBALS['OUTPUT']->copyright}</div>" : '';
			
			return <<<EOF
	<div style='clear: both'></div>
	$cr
	</body>
</html>		
EOF;
		}
		
	}

?>